package course.mystream;


import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.stream.Stream;

public class MyStream2 {
    public static void main(String[] args) {
//        HashMap<String,Integer> hm = new HashMap<>();
//
//        hm.put("zhangsan",23);
//        hm.put("lisi",24);
//        hm.put("wangwu",22);
//        hm.put("zhaoliu",23);
//        hm.put("liangqi",21);
//
//        hm.entrySet().stream().forEach(s->{
//            System.out.println(s);
//        });

        //数组
        int [] arr = {1,2,3,4,5};
        Arrays.stream(arr).forEach(s->
            System.out.println(s)
        );

        System.out.println("===========");
        Stream.of(1,2,3,4,5,6,7,8).forEach(s-> System.out.println(s));




    }
}
